<?php #coding: utf-8 æ ø å 


class Historie extends CI_controller {

	function index() {
        $this->load->model("core/element");
        $this->load->model("core/vis_model");
        $data['hieraki_top'] = $this->vis_model->hieraki("begivenhed");
       // $data['hieraki_top']['count'] = count($data['hieraki_top']);
       // print_r($data['hieraki_top']); 

        foreach($data['hieraki_top'] as $top) {

            $element = new element();
		    $element->find_under($top->id);
		    $under = $element->under;
        
			$lvl1[] = array(
				'top_navn' => $top->navn,
				'under' => $under,
            ); 
        }
        $data['lvl1'] = $lvl1;
     //   print_r($lvl1);

		$indhold_left[] = 'sektioner/historie_forside';
		$indhold_right[] = 'forord/titelblad';

		
		$data['content_left'] = $indhold_left;
		$data['content_right'] = $indhold_right;
    	$this->load->view('includes/templates/bogpaapult',$data);

    }



}
